package state.practice_02;

/**
 * @author yi qiang
 * @date 2021/6/15 17:06
 */
public class MetroContext {

    MetroState nowState;

    public MetroContext(MetroState nowState){
        this.nowState=nowState;
    }

    public MetroState getNowState() {
        return nowState;
    }

    public void setNowState(MetroState nowState) {
        this.nowState = nowState;
    }


    public void running() {
        nowState.running();
    }


    public void stopping() {
        nowState.stopping();
    }


    public void openDoor() {
        nowState.openDoor();
    }


    public void closeDoor() {
        nowState.closeDoor();
    }

}
